<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import = "com.weibo.dao.connDB" %>

<%	

String nameLogin = request.getParameter("name1");

connDB db = new connDB();
db.getConnection();

String[] name = new String[100]; 
int counter = 0;

String sql = "select * from user where nickname != '"+nameLogin+"' ";	
db.rs = db.executeQuery(sql);

while(db.rs.next())
{name[counter]= db.rs.getString("nickname");
   counter+=1;}


System.out.println(nameLogin+" "+name);
int row = counter;
%>

<table border="1" width="100%">

<%
	for (int x=0;x<counter;x++){
%>
		<tr>
		<td height="112" align="center" valign="bottom"><img src="http://pic.cnblogs.com/face/u160412.jpg" alt="" /><input type="text" name="textfield3" value=<%=name[2]%> size="10"/></td>
        <td align="center" valign="middle"><form id="form4" name="form4" method="post" action="">
             <label>
                 <% out.println("<a href=\"attention.jsp?FocusName="+name[x]+"\">focus</a>");%>
             </label>
           </form>
        </td>
        </tr>
<%
	}
%>
</table>
